Croatia and Morocco will face off in Qatar for a second time after playing out a 0-0 draw in their group opener
Morocco were happy to allow Spain possession but in the end, were desperately hanging on for the shootout as they battled injury and fatigue and lived dangerously in the closing stages.
Theo Hernandez's high hooked finish from a deflected Kylian Mbappe shot put the defending champions ahead and forced Walid Regragui's team to take the initiative, ending the game with more possession than Les Bleus.
I told my players to take 1,000 penalties, says Spain's Luis Enrique
The din of a concerned crowd transformed into a tumultuous racket when Abdelhamid Sabiri's free kick caught out Thibaut Courtois at his near post and captain Romain Saiss added a slight touch to see Morocco into the lead.
Spain, on four points, need a draw to guarantee their progress to the last 16 but will be looking to win and outscore Portugal, who face Iran, in case goal difference decides who finishes top.
Morocco's Bounou felt dizzy but will play against Canada, says team doctor
As the game wound on, Morocco fans screamed "Ole, ole, ole!" in unison, drowning out the handful of Portuguese fans and whistling whenever Portugal took possession of the ball.
Images from the FIFA 2018 World Cup qualifiers played across the globe on Saturday
'I will tell the players to enjoy themselves, as millions in Morocco will be watching'
The following factbox details five times a Video Assistant Referee (VAR) made an impact at the World Cup.
Regragui's tactical masterclass sends Portugal packing
Morocco relied on the usual mixture of North African style, combining committed defence with counter-attacks
Mbappe and Benzema inspire France to 2-0 win against Finland
India progressed to the Davis Cup Qualifiers for the first time ever after Sumit Nagal tamed aggressive teenager Henry Bernet in the first reverse singles to script the team's 3-1 win over Switzerland.
Morocco will no doubt revel in another opportunity to thrive as underdogs
Images from the FIFA World Cup Group F match between Morocco and Croatia on Wednesday.
At the stadium to congratulate her son was Sofiane Boufal's mother. Head Coach Walid Regragui's mother Fatima was there too, raining kisses on her son after the game.
Reuters TV footage showed people smashing shop ventures and fights with police. Some fires could also be seen on avenue de Friedland close to the Champs Elysees.
"After many kilometres travelled together, the Spanish Football Federation and Fernando Hierro have called an end to their relationship now that Spain have finished their participation in the World Cup," said a statement on the Spain team's website (www.sefutbol.com).
Belgian police detained a dozen people and made one arrest on Sunday after Morocco's victory over Belgium in the World Cup match in Qatar triggered riots in Brussels with a car and some electric scooters set on fire.
The 45-year-old Bopanna's final appearance on the Tour came at the Paris Masters, where he partnered Kazakhstan's Alexander Bublik, losing in the opening round earlier this week.
From the debate-arousing introduction of VAR to maximum number of Penalties to the superb Ronaldo, here are the A to Z of the ongoing 2018 World Cup
India open FIFA women's U-17 WC campaign against USA with hope to get at least a point
The flying wingback is one of the key players in the north African outfit whose last-16 match in the Qatar World Cup against Spain, at the Education City Stadium in Al Rayyan, gives them a chance to reach the World Cup quarter-finals for the first time.
Bayern Munich swatted aside Raja Casablanca 2-0 in a one-sided Club World Cup final on Saturday that did little to boost the credibility of a tournament which struggled to an anti-climax.
'I am not going to try and set up any particular tactical plan to counter Kylian'
The mesmerising moments that made the 2018 FIFA World Cup a blockbuster worldwide.
The French fans will be largely outnumbered by the Morocco supporters
The FIFA 2022 World Cup will kick-off in Qatar on Sunday, November 20. Here is a list of the 26-man squads playing in the quadrennial global football extravaganza.
The favourites to win next year's World Cup in Russia were given navigable paths to the last 16 with the coaches of Germany, Brazil, Argentina and Spain having reason to feel reasonably optimistic after Friday's draw.
The Indian team had been relegated to the World Group II after losing 2-3 to Denmark in the World Group Play-Off earlier this year.
Spain midfielder Koke revealed he and his team mates have been unable to watch some World Cup games because it interferes with their 'siesta', the traditional afternoon nap.
Banned former FIFA president Sepp Blatter said he feels the soccer World Cup underway in Moscow is a little bit like "my World Cup" because he has been so well received on his visit to Moscow.
Zoo director Vladimir Gerasimov believes Cleopatra might have a little better understanding of soccer than other animals.
Having become the first African team into the semis, Morocco now face Croatia in the third-place playoff on Saturday.
IMAGES from the FIFA World Cup Group B match played between Portugal and Iran in Saransk on Monday
The points table of the 2018 FIFA World Cup.